<% if (defined?(should_render_store_chooser?) && should_render_store_chooser?) || (defined?(should_render_internationalization_dropdown?) && should_render_internationalization_dropdown?) %>
  <li class="d-none d-xl-block internationalization-options">
    <div class="dropdown navbar-right-dropdown">
      <button id="internationalization-button-desktop" type="button" data-toggle="dropdown" class="navbar-right-dropdown-toggle" aria-label="<%= Spree.t(:internationalization) %>">
        <%= icon(name: 'global',
                classes: 'd-none d-xl-inline-block',
                width: 41,
                height: 36) %>
        <%= icon(name: 'arrow-down',
                classes: 'd-inline-block d-xl-none',
                width: 15,
                height: 15) %>
      </button>

      <div id="internationalization-options-desktop" class="dropdown-menu dropdown-menu-right text-left">
        <% if (defined?(should_render_store_chooser?) && should_render_store_chooser?) %>
          <% stores.each do |store| %>
            <div class="pl-3 d-flex justify-content-between align-items-center stores-list">
              <%= country_flag_icon(store_country_iso(store)) %>
              <%= store_link(store, class: "dropdown-item text-uppercase #{'font-weight-bold' if current_store == store}") %>
            </div>
          <% end %>
        <% else %>
          <%= render 'spree/shared/locale_dropdown' %>
          <div class="dropdown-divider"></div>
          <%= render 'spree/shared/currency_dropdown' %>
        <% end %>
      </div>
    </div>
  </li>
<% end %>
